﻿@namespace MudBlazor.Docs.Examples

<MudDialog Class="blur dialog-background" TitleClass="blur dialog-background-title" ContentClass="dialog-background-surface py-10" ActionsClass="dialog-background-surface">
    <DialogContent>
        Dialog Content
    </DialogContent>
    <DialogActions>
        <MudButton Color="Color.Error" OnClick="Cancel">Cancel</MudButton>
        <MudButton Color="Color.Primary" OnClick="Submit">OK</MudButton>
    </DialogActions>
</MudDialog>

<style>
    .blur {
        backdrop-filter: blur(10px);
    }

    .dialog-background {
        background-color: transparent;
    }

    .dialog-background-title {
        background: rgba(var(--mud-palette-info-rgb), 0.5);
        color: var(--mud-palette-white);
    }

    .dialog-background-surface {
        background: rgba(var(--mud-palette-surface-rgb), 0.75);
    }
</style>

@code {
    [CascadingParameter]
    private IMudDialogInstance MudDialog { get; set; }

    private void Submit() => MudDialog.Close(DialogResult.Ok(true));

    private void Cancel() => MudDialog.Cancel();
}
